package command;

import lombok.AllArgsConstructor;

/**
 * 关灯命令
 */
@AllArgsConstructor
public class LightOffCommand implements Command {
	// 接收者
	private LightReceiver lightReceiver;

	@Override
	public void execute() {
		lightReceiver.off();
	}

	@Override
	public void undo() {
		lightReceiver.open();
	}
}
